from django.utils.deprecation import MiddlewareMixin


class UserAgentMiddleware(MiddlewareMixin):

    def process_request(self, request):
        # print(f'自定义用户代理请求{request.headers["User-Agent"]}')
        pass
    def process_response(self, request, response):
        # print('自定义用户代理响应')
        return response


# Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36


# Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0

# python-requests/2.32.3

